
package com.quartet.utils.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 * 指标类型 1:接入设备数 2：平台累积数据量 3：抓拍数 4：录音条数 5：录音时长 6：设备运营时长
 * </p>
 * @author Zheng Jie
 * @date 2020-05-07
 */
@Getter
@AllArgsConstructor
public enum TargetTypeEnum {

    TERMINAL_COUNT("1", "接入设备数"),
    POSITION_COUNT("2", "平台累积数据量"),
    SNAP_COUNT("3", "抓拍数"),
    RECORDING_COUNT("4", "录音条数"),
    RECORDING_TIME("5", "录音时长"),
    OPERATE_TIME("6", "设备运营时长");
    private final String value;
    private final String description;

    public static TargetTypeEnum find(String val) {
        for (TargetTypeEnum dataScopeEnum : TargetTypeEnum.values()) {
            if (val.equals(dataScopeEnum.getValue())) {
                return dataScopeEnum;
            }
        }
        return null;
    }

}
